<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Partner extends Model
{
    protected $table = 'partner';
    //public $timestamps = false;
    const UPDATED_AT = null;

    public function provinceInfo(){
        return $this->hasOne('App\Models\Province','code','province')->select('code','name')->withDefault([
           'code' => -1,
           'name' => '',
        ]);
    }

    public function cityInfo(){
        return $this->hasOne('App\Models\City','code','city')->select('code','name')->withDefault([
           'code' => -1,
           'name' => '',
        ]);
    }



}
